Mega Code Archive
Date Time
1) Add 3 years to a date
2) Add Time to current time
3) Add TimeSpan to Date
4) AM Designator
5) Assign Now() to a date variable
6) Call IsLeapMonth for all the months in five years in the current era
7) Call IsLeapMonth() for all the months
8) Call to WeekdayName combined with call to Weekday
9) Calls GetDaysInMonth for the second month in each of five years in each era
10) CDate
11) Compare Date value in If statement
12) Current time
13) Current week in current year
14) Custom Format Strings
15) Date AddYears, AddMonths and AddDays
16) Date and time and numeric values using several different cultures
17) Date and TimeSpan
18) Date different parts
19) Date format
20) Date ToOADate
21) Date ToString, ToLongDateString, ToShortDateString, ToLongTimeString, ToShortTimeString and ToUniversalTime
22) DateAdd
23) DateTime parse date and time by DateTimeFormatInfo
24) DateTime Parse(12
25) DateTime Subtract
26) DateVariable = #112004#
27) DateVariable = #8272001 6
28) DateVariable = July 2, 2002
29) Day of the week
30) Defines a custom format string that displays the day of the week in parentheses after the month name, day, and year
31) Determining the weekday of a date
32) Different date between two dates
33) Different parts of Now
34) Dim fourthOfJuly As New Date(1776, 7, 4)
35) Dim inTheMorning As New Date(1776, 7, 4, 9, 45, 30)
36) Dim thirdOfJuly As Date = #731776 11
37) Displays the total number of weeks in the current year
38) Elapsed Ticks
39) Format the current date in various ways
40) Get Date from long integer
41) Get Hour from DateTime
42) Get Ticks from DateTime
43) Get UniversalTime from DateTime
44) Moon Phase
45) Now Ticks
46) Parse Date
47) Select Day Of Week
48) StopWatch
49) Subtract Time
50) System Time
51) The FirstDayOfWeek used for the en-US culture
52) Ticks times value
53) Time zone
54) TimeOfDay
55) TimeSpan and Date Substract
56) Timing code block
57) Today
58) ToLongDateString
59) ToLongTimeString
60) Use format specifiers to control the date display
61) Use Parse method to convert a string into a DateTime
62) Use StopWatch
63) Weekday Function